// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:53:59

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   ko.java

package com.zelix;

import java.io.IOException;
import java.util.Hashtable;

// Referenced classes of package com.zelix:
//            jb, nc, tb, xb, 
//            wb, lt, nt, hs, 
//            sx, cy, qb, ey, 
//            wu, gs

public class ko
    implements ey
{

    wu a;
    cy b;
    Hashtable c;
    private final boolean d;
    private static String z[];

    public ko(wu wu1, boolean flag)
    {
        a = wu1;
        d = flag;
        wu1.a(this);
        b();
    }

    public static nt a(nc nc1)
        throws wb
    {
        String s = nc1.d();
        int i = s.lastIndexOf(z[1]);
        if(i == -1)
            throw new wb("\"" + s + z[2]);
        String s1 = s.substring(0, i);
        try
        {
            sx sx1 = new sx(0);
            java.io.InputStream inputstream = nc1.a(sx1);
            if(inputstream != null)
            {
                jb jb1 = jb.a(inputstream, sx1.b());
                nt nt1 = new nt(jb1, nc1);
                return nt1;
            } else
            {
                throw new xb(s1, lt.a(s1) + z[3]);
            }
        }
        catch(IOException ioexception)
        {
            throw new xb(s1, s1 + z[0] + ioexception.getMessage());
        }
        catch(xb xb1)
        {
            throw xb1;
        }
        catch(tb tb1)
        {
            throw new wb(tb1.getMessage());
        }
    }

    public nt a(String s)
        throws xb, wb
    {
        if(s.startsWith("["))
            s = z[5];
        nt nt1 = (nt)c.get(s);
        if(nt1 != null)
            return nt1;
        try
        {
            nc nc1 = b.a(s);
            if(nc1 == null)
                throw new xb(s, lt.a(s) + z[4]);
            sx sx1 = new sx(0);
            java.io.InputStream inputstream = nc1.a(sx1);
            if(inputstream != null)
            {
                jb jb1 = jb.a(inputstream, sx1.b());
                nt nt2 = new nt(jb1, nc1);
                if(!s.equals(nt2.j()))
                {
                    String s1 = nc1.d();
                    String s2 = nc1.b();
                    if(s2 != null)
                        throw new wb(z[11] + s1 + z[8] + s2 + z[7] + nt2.l() + z[10] + lt.a(s) + z[9]);
                    else
                        throw new wb(z[11] + s1 + z[7] + nt2.l() + z[10] + lt.a(s) + z[9]);
                } else
                {
                    c.put(s, nt2);
                    return nt2;
                }
            } else
            {
                throw new xb(s, lt.a(s) + z[6]);
            }
        }
        catch(IOException ioexception)
        {
            throw new xb(s, s + z[0] + ioexception.getMessage());
        }
        catch(qb qb1)
        {
            throw new wb(qb1.getMessage());
        }
        catch(xb xb1)
        {
            throw xb1;
        }
        catch(tb tb1)
        {
            throw new wb(tb1.getMessage());
        }
    }

    cy a()
    {
        return b;
    }

    private void b()
    {
        b = new cy((String)a.a(), d);
        c = new Hashtable();
    }

    public void a(gs gs, Object obj, Object obj1, Object obj2)
    {
        b();
    }

    private static String z(char ac[]) {
        for (int i = 0; i < ac.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key =0x7e;
                    break;
                case 1:
                    key =10;
                    break;
                case 2:
                    key =40;
                    break;
                case 3:
                    key =109;
                    break;
                default:
                    key =91;
                    break;
            }
            ac[i] ^= key;
        }
        return new String(ac).intern();
    }

    static 
    {
        String as[];
        as = new String[12];
        as[0] = "^lA\001>^oZ\0374\f*\022M";
        as[1] = "PiD\f(\r";
        as[2] = "\\*L\002>\rd\017\031{\033dLM,\027~@MyPiD\f(\r(";
        as[3] = "^dG\031{\030e]\003?P*k\005>\035a\b\0313\033*K\001:\ryX\f/\026*G\035/\027eFM:\020n\b\037>\022eI\tu^\"\033\fr";
        as[4] = "^dG\031{\030e]\003?P*k\005>\035a\b\0313\033*K\001:\ryX\f/\026*G\035/\027eFM:\020n\b\037>\022eI\tu^\"\031\fr";
        as[5] = "\024k^\ft\022kF\nt1hB\b8\n";
        as[6] = "^dG\031{\030e]\003?P*k\005>\035a\b\0313\033*K\001:\ryX\f/\026*G\035/\027eFM:\020n\b\037>\022eI\tu^\"\032\fr";
        as[7] = "Y*K\0025\nkA\003(^~@\b{\035fI\036(^-";
        as[8] = "Y*A\003{Y";
        as[9] = "Y*I\036{\033rX\b8\noLC";
        as[10] = "Y*Z\f/\026oZM/\026kFM|";
        as[11] = "8cD\b{Y";
        for (int i = 0; i < as.length; i++) {
            as[i] = z(as[i].toCharArray());
        }
        z = as;

    }
}